﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace CRMSalesManagement.FrontPageShow
{
    public partial class ProductInformation : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                if (Request.QueryString["productInforId"] != null)
                {
                    int productID = Convert.ToInt32(Request.QueryString["productInforId"].ToString());
                    var member = CRM.Business.Product.GetNewById(productID);
                    if (member != null)
                    {
                        this.lblModel.Text = member.model;
                        this.lblType.Text = member.type;
                        this.lblBrand.Text = member.brand;
                        this.lblInnerDiameter.Text = member.innerDiameter.ToString();
                        this.lblExternalDiameter.Text = member.externalDiameter.ToString();
                        this.lblHeight.Text = member.height.ToString();
                        this.lblLimitSpeed.Text = member.limitSpeed.ToString();
                        this.lblReferenceSpeed.Text = member.referenceSpeed.ToString();
                        this.imgResult.ImageUrl = member.image;                        
                    }
                }
            }
        }
    }
}